	
		<h3 class="name">		
			<ol class="breadcrumb">
			  <li><a href="{{$this->Html->url('/flowsteps/operate/'.$step_id)}}">{{__($step_info['Flowstep']['name'])}}</a></li>
			  <li class="active">{{ __('View')}}</li>
			  <li class="active">{{$model_item['name']}}</li>
			</ol>		
		</h3> 
		
			

		
<div class="detail btline2 ">
	
		<div>
			<a href="{{$this->Html->url('/flowsteps/operate/customer_opportunities?action=add&customer_id='.$model_item['id'])}}" class="btn btn-primary">{{__('Add Opportunity')}}</a>
			<a href="{{$this->Html->url('/flowsteps/operate/customer_contacts?action=add&customer_id='.$model_item['id'])}}" class="btn btn-primary">{{__('Add Contact')}}</a>
		</div>
	<br/>

<div>
    <div id="Tracks">
		<portlet title="{{__('Customer Tracks')}}" fields="TcTrack.*" cache="no" model="TcTrack" list_tpl="inner" info="conditions[customer_id]=$data_id">
			<p><small>{{$item['created']}}</small></p>
			<p>{{$item['name']}}</p>
		</portlet>
	</div>
    <div id="Opportunities">
		<portlet title="{{__('Customer Opportunities')}}" fields="TcOpportunity.*" cache="no" model="TcOpportunity" list_tpl="inner" info="conditions[customer_id]=$data_id">
			<p><small>{{$item['created']}}</small></p>
			<p>{{$item['name']}}</p>
		</portlet>
	</div>
    <div id="Contacts">
    	<portlet title="{{__('Customer Contacts')}}" fields="TcContact.*" cache="no" model="TcContact" list_tpl="inner" info="conditions[customer_id]=$data_id">
			<p><label class="label label-default">{{$item['name']}}</label>  {{$item['email']}} &nbsp; {{$item['created']}}
				<a href="{{$this->Html->url('/flowsteps/operate/customer_tracks?action=add&contact_id='.$item['id'].'&customer_id='.$model_item['id'])}}" class="btn btn-xs btn-primary">{{__('Add Track')}}</a>
			</p>
		</portlet>
    </div>
    <h2>Profiles</h2>
    <div id="Profiles">

		{{loop $view_fields $field}}
			<?php
				if($field=='id') continue;
		$field_schema = $extschema[$field];
		$after = '';
		if (! empty ( $field_schema['explain'] )) {
			$after = '<span>' . $field_schema['explain'] . '</span>';
		}
	?>
			
			{{if $extschema[$field]['formtype'] == 'file'}}
				<div class="form-group clearfix">
				    <label for="{{Inflector::camelize($flow_model.'_'.$field)}}" class="col-sm-2 control-label">{{__d('i18nfield', $flow_model.'_'.$field)}}</label>
				    <div class="col-sm-9">
				    	<div class="row">
						{{loop $datainfo['Uploadfile'] $file}}
							<?php if($file['fieldname']!=$field) continue;?>
							<div class="col-sm-6 col-md-4 upload-fileitem">
							{{if strpos($file['type'],'image')!==false}}
								<a class="btn btn-success " title="{{$file['name']}}" href="/uploadfiles/download/{{$file['id']}}" target="_blank">
				                  	<img src="{{$file['thumb']}}"/>
				                  	<div class="filename">{{$file['name']}}</div>
				                  	<small>{{getHumanFileSize($file['size'])}}</small>
				                  </a>
							{{else}}									
								<a class="btn btn-success " title="{{$file['name']}}" href="/uploadfiles/download/{{$file['id']}}" target="_blank">
				                  	<i class="glyphicon glyphicon-cloud-download"></i>
				                  	<div class="filename">{{$file['name']}}</div>
				                  	<small>{{getHumanFileSize($file['size'])}}</small>
				                  </a>
							{{/if}}
							</div>
						{{/loop}}
						</div>
				    </div>
				</div>
				
			{{elseif $extschema[$field]['formtype'] == 'textarea'}}
				<div class="form-group clearfix">
				    <label for="{{Inflector::camelize($flow_model.'_'.$field)}}" class="col-sm-2 control-label">{{__d('i18nfield', $flow_model.'_'.$field)}}</label>
				    <div class="col-sm-9">
				    	<pre>{{$model_item[$field]}}</pre>
				    </div>
				</div>
			
			{{elseif $extschema[$field]['formtype'] == 'datetime' && $extschema[$field]['type']=='integer'}}
				<div class="form-group form-inline clearfix">
				    <label for="{{Inflector::camelize($flow_model.'_'.$field)}}" class="col-sm-2 control-label">{{__d('i18nfield', $flow_model.'_'.$field)}}</label>
				    <div class="col-sm-9">
				      {{date('Y-m-d H:i:s',$model_item[$field])}}
				    </div>
				</div>
			{{else}}
				<div class="form-group clearfix">
				    <label for="{{Inflector::camelize($flow_model.'_'.$field)}}" class="col-sm-2 control-label">{{__d('i18nfield', $flow_model.'_'.$field)}}</label>
				    <div class="col-sm-9">
				    	<p>{{$model_item[$field]}}</p>
				    </div>
				</div>		
			{{/if}}
		{{/loop}}
			
		</div>
    </div>
    	
</div>



